---
title: Chat
description: Learn how to generate chat completions using the Vercel AI SDK in your Next.js application
---

# Chat

So far we've learned how to generate text and structured data using single prompts. In this section, we will learn to use `messages` to add a sequence of messages to the language model and generate the response based on the context of the conversation – called chat completion.
